﻿using System;
using System.Windows.Forms;
using ReAnimation.Helpers.Common;
using ReAnimation.MVP.ViewInterfaces;

namespace ReAnimation.MVP.Views
{
    public partial class BaseFormView : Form, IView
    {
        public BaseFormView()
        {
            InitializeComponent();
            Closed += OnClosed;
        }

        private void OnClosed(object sender, EventArgs eventArgs)
        {
            Closed -= OnClosed;
            ViewClose.Throw(sender, eventArgs);
        }

        public event EventHandler ViewClose;
    }
}
